Verified Parallel String Matching in Haskell
نویسندگان
چکیده
In this paper, we prove correctness of parallelizing a string matcher using Haskell as a theorem prover. We use refinement types to specify correctness properties, Haskell terms to express proofs and Liquid Haskell to check correctness of proofs. First, we specify and prove that a class of monoid morphisms can be parallelized via parallel monoid concatenation. Then, we encode string matching as a morphism to get a provably correct parallel transformation. Our 1839LoC prototype proof shows that Liquid Haskell can be used as a fully expressive theorem prover on realistic Haskell implementations.
منابع مشابه
The Implementation and Optimisation of Parallel Pattern Matching in Haskell
Parallel pattern matching provides true commutative implementation of functions defined by cases in functional languages, because no argument is given precedence over any other. We present a formal semantics of parallel pattern matching and describe an implementation in Haskell that maps individual argument component matches into Concurrent Haskell threads. The performance of the Concurrent Has...
متن کاملA Tale of Two Provers
Abstract We demonstrate for the rst time that Liquid Haskell, a renement type checker for Haskell programs, can be used for arbitrary theorem proving by verifying a monoidal string matching algorithm implemented in Haskell. We use renement types to specify correctness properties, Haskell terms to express proofs of these properties, and Liquid Haskell to check the proofs. We evaluate Liquid H...
متن کاملMeasuring Naira: a Symbolic Program with Irregular Parallelism
Naira is a compiler for Haskell, written in Glasgow parallel Haskell. It exhibits modest, but irregular parallelism that is determined by properties of the program being compiled, e.g. the complexity of the types and of the pattern-matching. We report four experiments into Naira’s parallel behaviour using a set of realistic inputs: namely the 18 Haskell modules of Naira itself. The issues inves...
متن کاملRe ning a Parallel Algorithm For Calculating
String players know that bowing properly is the hardest skill they have to learn. In other work 4], we develop an algorithm that calculates bowings for BowTech, a project that supports string performers. This algorithm takes a signiicant amount of time to execute (in our second test case, over an hour for the implementation, written in Ada). We have implemented the algorithm in GpH, a parallel ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1610.07118 شماره
صفحات -
تاریخ انتشار 2016